<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
   xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
   xmlns:f="http://xmlns.jcp.org/jsf/core"
   xmlns:h="http://xmlns.jcp.org/jsf/html"
   xmlns:p="http://primefaces.org/ui"
   xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
   template="/WEB-INF/templates/business/buyer/template.xhtml">
  	<ui:define name="metadata">
	   	<f:metadata>	   		
	   		<f:viewParam
			name="serviceBuyerId"
			value="#{serviceBuyerHome.id}"
		></f:viewParam>
		<f:event
			listener="#{serviceBuyerHome.initConversation()}"
			type="preRenderView"
		></f:event>
	   	</f:metadata>
   	</ui:define>
   	<ui:define name="buyer_head">
   		<h:outputStylesheet name="/css/public/override_primefaces.css" /> 
   		<style type="text/css">
   			.label {
   				width: 33%;
   			}
   			
   			.value {
   				width: 67%;
   			}
   		</style>
   	</ui:define>
   	
	<ui:define name="buyer_content">
		<p:panel header="采购方信息">
			<h:form id="editForm">
					<p:messages id="messages" />					
					<p:panel
						id="baseInfo"
						style="margin-bottom:10px;"
						styleClass="nureg-cont nuregcbox nuregcboxsty"
					>
			
						<h:panelGrid
							columns="2"
							cellpadding="5"
						>
						<p:outputLabel for="reason" value="驳回原因" style="color:red;" />
							<h:outputText id="reason" style="color:red;"
								value="#{serviceBuyerHome.instance.currRejectRecord.reason}" />
							<p:outputLabel
								for="cnname"
								value="用户名称"
							/>
							<p:inputText
								id="cnname"
								value="#{serviceBuyerHome.instance.cnname}"
								required="true"
							>
								
							</p:inputText>
							
							<p:outputLabel for="creditCode" value="组织机构代码/统一征信代码"></p:outputLabel>
							<p:inputText id="creditCode"
										value="#{serviceBuyerHome.instance.creditCode}"
										required="true"></p:inputText>
							<p:outputLabel for="legalPerson" value="法定代表人"></p:outputLabel>
							<p:inputText id="legalPerson"
										value="#{serviceBuyerHome.instance.legalPerson}"
										required="true"></p:inputText>
						
							<p:outputLabel for="legalPersonPhoneNumber" value="法人联系电话"></p:outputLabel>
							<p:inputText id="legalPersonPhoneNumber"
										value="#{serviceBuyerHome.instance.legalPersonPhoneNumber}"
										required="true"></p:inputText>
							
							<p:outputLabel
								for="firstContactor"
								value="第一联系人"
							/>
							<p:inputText
								id="firstContactor"
								value="#{serviceBuyerHome.instance.firstContactor}"
								required="true"
							/>
							<p:outputLabel
								for="firstContactorPhoneNumber"
								value="第一联系人电话"
							/>
							<p:inputText
								id="firstContactorPhoneNumber"
								value="#{serviceBuyerHome.instance.firstContactorPhoneNumber}"
								required="true"
							/>
							<p:outputLabel
								for="secondContactor"
								value="第二联系人"
							/>
							<p:inputText
								id="secondContactor"
								value="#{serviceBuyerHome.instance.secondContactor}"
							/>
							<p:outputLabel
								for="secondContactorPhoneNumber"
								value="第二联系人电话"
							/>
							<p:inputText
								id="secondContactorPhoneNumber"
								value="#{serviceBuyerHome.instance.secondContactorPhoneNumber}"
							/>
							
							<p:outputLabel
								for="buyerType"
								value="用户类型"
							/>
							<p:selectOneMenu
								id="buyerType"
								value="#{serviceBuyerHome.instance.buyerType}"
								required="true"
							>
								<f:selectItem
									itemLabel="请选择"
									itemValue="#{null}"
								/>
								<f:selectItem
									itemLabel="个人"
									itemValue="个人"
								/>
								<f:selectItem
									itemLabel="公司单位"
									itemValue="公司单位"
								/>
							</p:selectOneMenu>
							<p:outputLabel
								for="address"
								value="地址"
							/>
							<p:inputText
								id="address"
								value="#{serviceBuyerHome.instance.address}"
								styleClass="input-large"
							/>
						</h:panelGrid>
					</p:panel>
				
					<p:commandButton
						action="#{serviceBuyerHome.reSubmit()}"
						value="重新提交"
						ajax="true"
						update="@form"						
					/>
					<p:commandButton
						action="#{serviceBuyerHome.cancel()}"
						value="取消"
						immediate="true"
					></p:commandButton>
		
				</h:form>
		</p:panel>
		
	</ui:define>
   
</ui:composition>